﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCenter/Admin.master" %>

<script runat="server">
    private int Item_Id = 0;
    public Issued MyText;
    public string RealText;
    protected void Page_Load(object sender, EventArgs e)
    {

            Item_Id = Utils.GetQueryString("id", 0);
            MyText = new Issued(Item_Id);
            if(MyText.Item_Text!=null)
                RealText = FormatHtmlCode(MyText.Item_Text);
    }
    public string FormatHtmlCode(string Text_Value)
    {
        /* 双引号处理 */
       
        /* 空格处理 */
        Text_Value = Text_Value.Replace("&nbsp;", " ");
        Text_Value = Text_Value.Replace("&amp;lt;", "<");
        Text_Value = Text_Value.Replace("&amp;gt;", ">");
        Text_Value = Text_Value.Replace("&lt;", "<");
        Text_Value = Text_Value.Replace("&gt;", ">");
        Text_Value = Text_Value.Replace("<br />", "");
        Text_Value = Text_Value.Replace("<br>", "");
        /* URL 选晰 */
        Text_Value = Text_Value.Replace("&amp;amp;", "&");
        Text_Value = Text_Value.Replace("/pulgin/kindeditor/asp.net/../../", "");
        Text_Value = Text_Value.Replace("\n","");
        
        /* 优酷播放器进行重编 */
        Text_Value = Text_Value.Replace("<embed", "<embed allowfullscreen=\"true\"");
        /* 编码重置 */
        Text_Value = Utils.HtmlDecode(Text_Value);
		 Text_Value = Text_Value.Replace("&quot;", "\"");
        return Text_Value;
    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
body{ background-color:#eee;}
#View{ width:940px; padding:20px; background-color:#fff; margin:20px 0 20px 10px; border:1px solid #ccc; box-shadow:5px 5px 3px #333;}
#View,#View *{ font-family:"UKIJ Tuz Tom"; direction:rtl;}
#View img{ display:block; margin:10px auto;}
#Summary{ background-color:#eee; padding:10px; margin:10px 0}
#Content,#Content p{ font-size:11pt; direction:rtl; text-align:justify; text-indent:25px;}
h3{ text-align:center;}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><%=Lang.Show("Issued") %> - <%=Lang.Show("View") %></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<div id="View">
	
    <h3><%=MyText.Item_Title %></h3>
    <div id="Text_Info"><%=Lang.Show("Published")%> : <%=MyText.Item_Create_Time.ToString("yyyy/MM/dd HH:mm") %></div>
    <div id="Summary"><b><%=Lang.Show("Summary")%> : </b><%=MyText.Item_Summary %></div>
    <div id="Content"><%=RealText%></div>
</div>
</asp:Content>

